cPanel Config

Loan Manager

levitraCialisZappos

Welcome to cPanelConfig the fastest growing cPanel configuration and troubleshooting guide on the internet. Please take the time and register. We would love to have your contribution to this completely free cPanel resource. We are updating this daily so be sure to visit us on a regular basis.

Tracing what a Linux process is doing

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

Posted by yolau

From time to time you will get hanged process or you are unsure of what a process is doing at that moment.

You can trace what a process is doing by running:

 strace -p PID

Where PID is the process ID. Whis will show you what that process is doing in real time.

This is usefull for detecting  exploits or the source of a hang process.

To detach from that process simply press CTRL + C.

Hope it helps ! Leave a comment if you have any questions.

Share this:
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • De.lirio.us
  • Furl
  • MyShare
  • Smarking
  • Technorati
  • YahooMyWeb

If you enjoyed this post, make sure you subscribe to my RSS feed!

3 Responses to “Tracing what a Linux process is doing”

  1. in whm Main >> Server Status >> CPU/Memory/MySQL Usage

    i found /usr/sbin/mysqld –basedir/ –datadir/var/lib/mysql –usermysql –pid-file/var/lib/mysql/ekush.starhostbd.com.pid –skip-external-locking –port3306 –socket/var/lib/mysql/mysql.sock is marked as yallow.

    how can low down the load?

  2. Honestly, I prefer to use strace -Ffv -s 8192 (-p /)

    This will give you *much* more information. It will also follow any forked/spawned/cloned processes. Using this in conjunction with -o is handy for stracing cpsrvd itself so you you can look at it after the fact in less and get a better idea of what is going on.

    If you are looking for a specific syscall, using this with -e is handy as well. So, if you just want to see file operations, add -e file to it (see man strace for more info)

    Another neat trick is using this with awk to generate the -p flags to strace multiple processes (like httpd):

    strace -Ffv -s 8192 -o ~/httpd.strace `ps aux | awk ‘/httpd/ {print ” -p ” $2}’ | tr -d ‘\n’`

    which will launch a strace on every process name matching httpd.

  3. Percocet….

    Generic percocet. Percocet. Description of percocet. Percocet effects. How do i get off percocet. Percocet shipped cod no prior. Percocet side effects….

Leave a Reply